import {INavigator} from "./NavigatorTypes";
import {Platform} from "react-native";
import NativeNavigator from "./support/NativeNavigator";


class NavigatorFactory {
    public static create(): INavigator | never {
        if(Platform.OS === 'web'){
            throw new Error('only on android.');
        }
        else if(Platform.OS === 'android'){
            return new NativeNavigator();
        }

        throw new Error();
    }
}

const NavigatorBar:INavigator = NavigatorFactory.create();
export default NavigatorBar;
